package com.example.spring_boot_service.controller;

import com.example.spring_boot_service.common.Result;
import com.example.spring_boot_service.entity.User;
import com.example.spring_boot_service.service.UserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
@CrossOrigin
@RestController
@RequestMapping("/user")
public class userController {
    @Resource
    UserService userService;
    /*
    * 查询所有数据
    * */
    @GetMapping("/select")
    public Result selectAll(User user){
        List<User> list = userService.selectUser(user);
        return Result.success(list);
    }
}
